home *** CD-ROM | disk | FTP | other *** search
- Path: noc.netcom.net!news
- From: Tarang Deshpande <tarang@willows.com>
- Newsgroups: comp.lang.c
- Subject: Re: Static vs Dynamic linking
- Date: Tue, 09 Apr 1996 14:59:19 -0700
- Organization: NETCOM Network Operations
- Message-ID: <316ADDB7.731@willows.com>
- References: <4kefrj$smn@nntp.ucs.ubc.ca>
- NNTP-Posting-Host: daffy.willows.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0GoldB2 (Win95; I)
-
- Daniel l Aldham wrote:
- >
- > Could someone explain , or point out a good reference to , what
- > is the difference and/or advantages of static versus dynamic linking.
- > Thanks
- >
- > Danny Aldham
-
-
- Static linking occures at compile time whereas dynamic linking occurs
- at run-time. Because of this a program that uses dynamic linking will
- run slighly slower than the same program linked staticly because the
- linker is figuring out what address to jump to when a call is made
- as opposed to having figured that out when compiling as in static
- linking. The advantage of dynamic linking is it allows more than
- one program at a time to share the DLL whereas if the programs were
- staticly linked then each program would have its own copy. Another
- advantage of dynamic linking is it allows you to change something
- in the DLL without having to recompile the program(s) as long as
- there is no interface change. As an offshoot to this if you need
- to distribute your software then updating users with one DLL is easier
- than updating users with multiple programs.
-
- Hope that helps.
-
- Tarang
-